import { http } from "@/utils/http";
import type { HttpResult } from "@/utils/http/types";

export function addBusColumn(params: object) {
  return http.request<HttpResult>("post", "/admin/def/column/insert/batch", {
    data: params
  });
}

export function deleteBusColumn(ids: string) {
  return http.request<HttpResult>("post", `/admin/def/column/delete/${ids}`);
}

export function updateBusColumn(params: object) {
  return http.request<HttpResult>("post", "/admin/def/column/update/batch", {
    data: params
  });
}

export function queryBusColumnList(params: object) {
  return http.request<HttpResult>("get", "/admin/def/column/get/list", {
    params: params
  });
}

export function queryColumnBriefList(tableId: string) {
  return http.request<HttpResult>(
    "get",
    `/admin/def/column/get/list/${tableId}`
  );
}
